﻿using Microsoft.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
using Ebusiness_ProductService.Models;

namespace Ebusiness_ProductService.Data;

public class Ebusiness_ProductServiceDbContext : AbpDbContext<Ebusiness_ProductServiceDbContext>
{
    public Ebusiness_ProductServiceDbContext(DbContextOptions<Ebusiness_ProductServiceDbContext> options)
        : base(options)
    {
    }

    public DbSet<Product> products { get; set; }

    //public DbSet<ProductImage> productImages { get; set; }

    protected override void OnModelCreating(ModelBuilder builder)
    {
        base.OnModelCreating(builder);

        /* Include modules to your migration db context */
        /* Configure your own entities here */
        //从当前的程序集加载所有的实体配置
        builder.ApplyConfigurationsFromAssembly(this.GetType().Assembly);
    }
}
